﻿using UnityEditor;

namespace Yoozoo.Managers.ResourceManagement
{
    public class AndroidPlugin
    {
        public static void Build(bool isDebug)
        {
            string androidPathAAR = "";
            PluginImporter importer = null;
            
            //服务器安全SDK https://youzu.feishu.cn/wiki/wikcnkzZvMa585UWndgWfFRa4kg
            androidPathAAR = "Assets/Plugins/MsgSecurity/Android/securitylibrary-debug.aar";
            importer = (PluginImporter)AssetImporter.GetAtPath(androidPathAAR);
            if (importer != null && importer.GetCompatibleWithPlatform(BuildTarget.Android) != isDebug)
            {
                importer.SetCompatibleWithPlatform(BuildTarget.Android, isDebug);
                importer.SaveAndReimport();
            }

        }
    }
}